--- a/tools/dbusmenu-dumper.c
+++ b/tools/dbusmenu-dumper.c
@@ -388,7 +388,10 @@
 int
 main (int argc, char ** argv)
 {
+#if GLIB_VERSION_CUR_STABLE < G_ENCODE_VERSION(2, 36)
+	// g_type_init is deprecated after 2.36
 	g_type_init();
+#endif
 	GError * error = NULL;
 	GOptionContext * context;
 
--- a/tools/testapp/main.c
+++ b/tools/testapp/main.c
@@ -135,7 +135,10 @@
 
 int main (int argc, char ** argv)
 {
+#if GLIB_VERSION_CUR_STABLE < G_ENCODE_VERSION(2, 36)
+	// g_type_init is deprecated after 2.36
 	g_type_init();
+#endif
 
 	if (argc != 2) {
 		g_warning(USAGE);
